#ifndef _IM_SERVER_DISPATCH_PRESENCE_TASK_H_
#define _IM_SERVER_DISPATCH_PRESENCE_TASK_H_

#include <string>
#include <boost/asio.hpp>

#include <boost/enable_shared_from_this.hpp>

#include "robot_thread_manager.h"
#include "ImServiceCommon_types.h"

namespace imserver {

using apache::thrift::concurrency::Runnable;

class DispatchPresenceTask : public Runnable  {
 public:
  DispatchPresenceTask(int64_t uid, const std::string& session, const SessionType::type type)
      : uid_(uid), session_(session), type_(type) {}
  virtual void run();

  void ShopPresenceChanged();
  void CustomerPresenceChanged();
//void FromShopPresence(const ImMessage& message);
//void ToShopPresence(const ImMessage& message);
 private:
  int64_t uid_;
  const std::string& session_;
  const SessionType::type type_;
};

}

#endif // _IM_SERVER_DISPATCH_PRESENCE_TASK_H_

